unit ports;

interface

function inportb(port:word):byte;
procedure outportb(port, zn:word);

implementation

function inportb(port:word):byte;[public, alias: 'inportb'];
var
        temp : byte ;
begin
        asm
                mov dx,port
                in al,dx
                mov temp , al
        end;
end;
 
 
procedure outportb(port, zn:word);[public, alias: 'outportb'];
var
        zz:char;
begin
        zz:=char(zn);
        asm
                mov dx, port
                mov al, zz
                out dx, al
        end;
end;

end.